# ###
# 可以使用 pytest 的标准钩子（如 pytest_runtest_setup、pytest_runtest_call 或 pytest_runtest_teardown）
# ####
import pytest
#import requests #请求接口
#import responses_validator ##断言响应
# def pytest_yaml_run_setup(item): #在合适时机被调用
#     step = item.current_step
#     print("yaml中的用例步骤哦",step)
#     a = step['a']
#     b = step['b']
#     c = step['c']
#
#     assert a + b == c
# def pytest_yaml_run_setup(item): #在合适时机被调用
#     step = item.current_step
#     key = list(step)[0]
#     value = list(step.values())[0]
#
#     match key:
#         case 'request':
#             item.resp = requests.request(**value)
#         case 'response':
#             responses_validator.validator(item.resp,**value)
#
#     return True
#     print("yaml中的用例步骤哦",step)
#     a = step['a']
#     b = step['b']
#     c = step['c']
#
#     assert a + b == c


